<template>
<div class="panel">
    <div class="panel-header">
        <div class="bl"></div>
        <div class="title">客资信息</div>
    </div>
    <div class="panel-body">
        <el-descriptions :column="4">
            <el-descriptions-item label="联系人">{{ customer.fullname }}</el-descriptions-item>
            <el-descriptions-item label="渠道">{{ customer.source.title }}</el-descriptions-item>
            <el-descriptions-item label="创建人">{{ customer.creator.realname }}</el-descriptions-item>
            <el-descriptions-item label="跟进人">{{ allocate.user.realname }}</el-descriptions-item>
        </el-descriptions>

        <el-table :data="contactList" border>
            <el-table-column label="角色" prop="role_type" align="center" width="120">
                <template slot-scope="scope">
                    <el-link type="primary" @click="showCustomer">{{ scope.row.role_type }}</el-link>
                </template>
            </el-table-column>
            <el-table-column label="类型" prop="tag" align="center" width="120"></el-table-column>
            <el-table-column label="联系方式" prop="contact"></el-table-column>
        </el-table>
    </div>
</div>
</template>

<script>

export default {
    props: {
        customer: {
            type: Object,
            default: function () {
                return {
                    id: '',
                    fullname: '',
                    creator: {
                        id: '',
                        realname: ''
                    },
                    source: {
                        id: '',
                        title: ''
                    }
                };
            }
        },
        allocate: {
            type: Object,
            default: function () {
                return {
                    id: '',
                    user: {
                        id: '',
                        realname: ''
                    }
                };
            }
        },
        contactList: {
            type: Array,
            default: function () {
                return [];
            }
        }
    },
    data() {
        return {

        };
    },
    methods: {
        showCustomer() {
            
        }
    }
}
</script>

<style>

</style>
